from rest_framework import serializers

from cart import models
class CourseSer(serializers.ModelSerializer):
    class  Meta:
        model=models.Course
        # fields=["id","coursename","price","cover"]
        fields='__all__'

class CartSer(serializers.ModelSerializer):
    class  Meta:
        model=models.CartModel
        fields="__all__"

class CarSer(serializers.ModelSerializer):
    course=CourseSer()
    class  Meta:
        model=models.CartModel
        fields="__all__"